package com.xeecos
{
	import flash.net.URLLoader;
	import flash.net.URLRequest;
	import flash.net.URLRequestMethod;
	import flash.net.URLVariables;
	
	public class HttpLoader extends URLLoader
	{
		public function HttpLoader(request:URLRequest=null)
		{
			super(request);
		}
		public function post(url:String,params:Object):void{
			var req:URLRequest = new URLRequest(url);
			if(params){
				var vars:URLVariables = new URLVariables;
				for(var i in params){
					vars[i] = params[i];
					trace(i,":",vars[i]);
				}
				req.data = vars;
			}
			req.method = URLRequestMethod.POST;
			this.load(req);
		}
	}
}